<template>
  <div v-if="indexMenu == null">
    <h1>欢迎使用{{ clientName }}</h1>
  </div>
  <component v-else :is="indexMenuPage" />
</template>
<script>
import { defineAsyncComponent } from 'vue'
export default {
  name: 'Index',
  computed: {
    clientName() {
      return window.clientName
    },
    indexMenu() {
      return this.$store.getters.indexMenu
    },
    indexMenuPage() {
      return defineAsyncComponent(() =>
        import(`@/views${this.indexMenu.menuPage}/index.vue`)
      )
    },
  },
}
</script>
